package com.edu.demo.service;

import com.edu.demo.entity.Teacher;
import com.baomidou.mybatisplus.extension.service.IService;
import com.edu.demo.pojo.AjaxResult;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jixuewei
 * @since 2023-01-12
 */
public interface ITeacherService extends IService<Teacher> {

    /**
     * 分页查询教师
     * @param start
     * @param size
     * @return
     */
    List<Teacher> queryByPage(int start, int size, AjaxResult result);

    /**
     * 更新信息
     * @param teacher
     * @return
     */
    int updateTeacher(Teacher teacher);

    /**
     * 更新教师信息
     * @param teachers
     */
    void updateTeachers(List<Teacher> teachers);

    /**
     * 添加一个教师
     * @param teacher
     * @return
     */
    int insertTeacher(Teacher teacher);

    /**
     * 按条件查询教师
     * @param teacher
     * @return
     */
    List<Teacher> findTeachers(Teacher teacher,int index,int size,AjaxResult ajaxResult);
}
